package com.rs.game.player.dialogues;

import com.rs.cache.loaders.NPCDefinitions;

public class SwirlBirthday extends Dialogue {

	private int npcId;
	
	@Override
	public void start() {
		npcId = (Integer) parameters[0];
		sendNPCDialogue(npcId, 9827, "?" );
	}
	
	@Override
	public void run(int interfaceId, int componentId) {
	if (stage == -1) {
		stage = 0;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 0) {
		stage = 1;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	} else if (stage == 1) {
		stage = 2;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 2) {
		stage = 3;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	}else if (stage == 3) {
		stage = 4;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 4) {
		stage = 5;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	} else if (stage == 5) {
		stage = 6;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 6) {
		stage = 7;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	}else if (stage == 7) {
		stage = 8;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 8) {
		stage = 9;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	}else if (stage == 9) {
		stage = 10;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 10) {
		stage = 11;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	} else if (stage == 11) {
		stage = 12;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 12) {
		stage = 13;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	}else if (stage == 13) {
		stage = 14;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 14) {
		stage =15;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	}else if (stage == 15) {
		stage = 16;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 16) {
		stage = 17;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	} else if (stage == 17) {
		stage = 18;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 18) {
		stage = 19;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	}else if (stage == 19) {
		stage = 20;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 20) {
		stage = 21;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	}else if (stage == 21) {
		stage = 22;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 22) {
		stage = 23;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	} else if (stage == 23) {
		stage = 24;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 24) {
		stage = 25;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	}else if (stage == 25) {
		stage =26;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 26) {
		stage = 27;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	}else if (stage == 27) {
		stage = 28;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 28) {
		stage = 29;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	} else if (stage == 29) {
		stage = 30;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 30) {
		stage = 31;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	}else if (stage == 31) {
		stage = 32;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 32) {
		stage = 33;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	}else if (stage == 33) {
		stage = 34;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 34) {
		stage = 35;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	} else if (stage == 35) {
		stage = 36;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 36) {
		stage = 37;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	}else if (stage == 37) {
		stage = 38;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 38) {
		stage = 39;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	}else if (stage == 39) {
		stage = 40;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 40) {
		stage = 42;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	} else if (stage == 41) {
		stage = 42;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 42) {
		stage = 43;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	}else if (stage == 43) {
		stage = 44;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 44) {
		stage = 45;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	}else if (stage == 45) {
		stage = 46;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 46) {
		stage = 47;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	} else if (stage == 47) {
		stage = 48;
		sendPlayerDialogue(Expressions.NORMAL, "?");
	} else if (stage == 48) {
		stage = 49;
		sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"?" }, IS_NPC,npcId, 9827);
	} else if (stage == 49) {
		if (player.getUsername().equalsIgnoreCase("Swirl")) {
			stage = 50;
			sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"Oh hello Swirl. Just wanted to wish you a happy birthday ;)" }, IS_NPC,npcId, 9827);
			return;
		} else {
			stage = 50;
			sendEntityDialogue(SEND_4_TEXT_CHAT,new String[] {NPCDefinitions.getNPCDefinitions(npcId).name,"Actually, nevermind.." }, IS_NPC,npcId, 9827);
		}
	} else if (stage == 50) {
		end();
	}

	}

	@Override
	public void finish() {
		// TODO Auto-generated method stub
		
	}

}
